<?php

if(AccessLog){
    //页面访问后
    getHooks()->add_action('app_open_after', function () {
        global $app_start_time, $debug;
        if ($debug) log_tofile(getRequestUri() . ",ms:" . (microtime(1) - $app_start_time));
        log_access();
    });

//找不到路径
    getHooks()->add_action('app_notfound', function () {
        log_access("访问页面不存在");
    });

//无权访问呢
    getHooks()->add_action('app_noaccess', function () {
        log_access("访问权限");
    });

//网站关闭
    getHooks()->add_action('app_close', function () {
        log_access("关闭网站");
    });
}
